home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Enlighten DSM 1.1
/
SGI EnlightenDSM 1.1.iso
/
aix41
/
emd.z
/
emd
/
bin
/
postinstall_sysadm
< prev
next >
Wrap
Text File
|
1998-06-30
|
2KB
|
140 lines
#!/bin/sh
#
# Copyright (c) 1990-1998 Enlighten Software Solutions, Inc.
# -- All Rights Reserved --
#
# usage: $0 upgrade_flag (0=install, 1=upgrade)
#
umask 077
PATH=/bin:/usr/bin:/etc:/usr/ucb:/usr/bsd:/usr/etc:$PATH ; export PATH
exit_code=0 ; export exit_code
appName=`basename $0`
os_name=`uname -s`
os_release=`uname -r`
upgrade=0
if [ "$#" -ge 1 ] ; then
upgrade=$1
fi
#
# determine what ps options to use.
# All systems use "-e" expcept for
# SunOS 4.1.3 and 4.1.4 that use -auxww
#
ps_opts="-e"
if [ "$os_name" = "SunOS" ] ; then
case "$os_release" in
4.1.* )
ps_opts="-auxww" ;;
* ) ;;
esac
fi
error_check () {
if [ $? -ne 0 ] ; then
echo "$appName: Fatal: Could not successfully finish configuring EMD." 1>&2
exit 1
fi
}
if [ -z "$ENLIGHTEN" ] ; then
echo "$appName: Fatal: The ENLIGHTEN variable was not set. " 1>&2
exit 1
fi
#
# make sure we are in the right directory
#
cd $ENLIGHTEN
for i in bin/script1 bin/script2 ; do
if [ -f $i ] ; then
chown root $i
chmod 700 $i
fi
done
#
# ensure correct permissions on some directories
#
for i in bin config \
config/backup/8mm \
config/backup/cart \
config/backup/jobs \
config/backup/log \
config/backup/logfiles \
config/backup/raw \
config/backup/reel \
config/backup/regular \
config/backup/table \
config/defaultpool \
config/formlet \
config/overrides \
config/rfd \
config/rfd/jobs \
config/rfd/logfiles \
config/userauth \
config/wxy \
secure \
lpr \
maps \
msg msg/C \
tmp \
work \
.data
do
if [ ! -d $i ] ; then
mkdir -p $i
fi
chmod 700 $i
done
# any user needs to be able write xenln and sm log files
# same for rfd log files
for i in logs config/rfd/logfiles
do
chmod 700 $i
done
# make form letters writable by group
i=config/formlet/*
chmod 600 $i
chmod 700 tmp
chmod 700 scripts
# make this file writable by group
# assume the group exists or was created above
# the file is not there on DEC OSF1
i=config/winn.out
if [ -f $i ] ; then
chmod 600 $i
fi
#
# Setup default pool
#
uname -n > netgroup/default
#echo "Running diagnostic program to check installation."
bin/e_diag
if [ $? -ne 0 ] ; then
echo "The diagnostic program discovered some potential problems." 1>&2
echo "Please call Enlighten Software Support for assistance." 1>&2
exit 1
fi
exit 0